import request from '@/request'

export function findAll(data) {
    return request.post("hospital/findAll", data);
}

export function findAllCity(data) {
    return request.post("city/findAll", data);
}

export function findAllProvince(data) {
    return request.post("province/findAll", data);
}
export function findLike(str) {
    return request.post("hospital/findLike",str,request.textConfig);
}

export function findAllCountry(data) {
    return request.post("country/findAll", data);
}

export function update() {
    return request.post("hospital/update");
}

export function doimportxls() {
    return request.post("hospital/import");
}

export function doexportxls() {
    return request.get('hospital/download');
}

export function doSaveOrUpdate(data) {
    let path = data.hId ? "update" : "save";
    return request.post(`hospital/${path}`, data);
}

export function dodel(hId) {

    return request.post("hospital/delete", hId, request.textConfig);
}


export function dofindAllProvince() {
    return request.post("hospital/findAllProvince",);
}

export function dofindAllCity(data) {
    return request.post("hospital/findAllCity", data, request.textConfig);
}

export function dofindAllCounty(data) {
    return request.post("hospital/findAllCounty", data, request.textConfig);
}

export function dofindAllDockUser() {
    return request.post("hospital/findAllDockUser");
}

export function doFindDockUserByHId(hId){
    return request.post("hospital/findDockUserByHId", hId, request.textConfig);
}

export function doFindAllEmp(){
    return request.post("hospital/findAllEmp");
}